﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace _07MindFile.Models
{
    public class MindMapZtree
    {
        [JsonIgnore]
        public string pid { get; set; }

        public string name { get; set; }

        public bool open { get; set; } = true;

        public List<MindMapZtree> children { get; set; }

        public void AddChilrden(MindMapZtree ztree)
        {
            if (children == null)
            {
                children = new List<MindMapZtree>(); 
            }
            children.Add(ztree);
        }
    }
}
